package com.sc.pattern.simplelistener;

/**
 * Created  on 2018/1/6.
 *
 * @author sc
 */
public abstract class Observer {

    protected Subject subject;

    public Observer(Subject subject) {
        this.subject = subject;
        subject.attach(this);
    }

    public Subject getSubject() {
        return subject;
    }

    public abstract  void update();
}
